<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGroupLiveCodesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('group_live_codes', function (Blueprint $table) {
            $table->string('id')->primary();
            $table->string('title')->comment('群活码标题');
            $table->text('group_qr_code')->comment('群二维码');
            $table->text('wx_qr_code')->comment('微信二维码');
            $table->date('expiry_date')->nullable()->comment('失效日期');
            $table->unsignedBigInteger('scan_count')->default(0)->comment('扫描次数');
            $table->unsignedTinyInteger('status')->comment('状态');
            $table->text('group_live_qr_code')->nullable()->comment('群活码');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('group_live_codes');
    }
}
